import {request, uploadFile} from './bks.request'

// 获取用户vip
export const isUserVip = () => {
  return request({
    url: '/applet/member/vip/judgment'
  })
}
// 咨询发布和回答状态
export const commentState = (params) => {
  return request({
    url: '/sys/sysSetting/applet-anon/comment',
    params
  })
}
// 咨询列表
export const consultList = (params) => {
  return request({
    url: '/applet/consult/applet-anon',
    params
  })
}
// 咨询详情
export const consultDetail = (params) => {
  return request({
    url: '/applet/consult/applet-anon/'+params.consultId,
    params
  })
}

// 回答详情
export const answerDetail = (params) => {
  return request({
    url: '/applet/applet-anon/member/concern/answer/details',
    params
  })
}
// 咨询删除
export const consultDelete = (params) => {
  return request({
    url: '/applet/consult/delete',
    params
  })
}

// 采纳回复
export const adoptReply = (params) => {
  return request({
    url: '/applet/consult/adopt/expert',
    params
  })
}


// 咨询详情 - 点赞
export const consultDetailLike = (params) => {
  return request({
    url: '/applet/consult/like/'+params.id
  })
}
// 咨询详情 - 取消点赞
export const consultDetailUnlike = (params) => {
  return request({
    url: '/applet/consult/unlike/'+params.id
  })
}

// 咨询详情 - 回复列表
export const answerReplyList = (params) => {
  return request({
    url: '/applet/consult/reply/applet-anon/'+params.consultId,
    params
  })
}
// 咨询详情 - 回复删除
export const answerReplyDelete = (params) => {
  return request({
    url: '/applet/consult/reply/'+params.replyId,
    method: 'delete',
    params
  })
}

// 咨询详情 - 回复
export const answerReply = (data) => {
  return request({
    url: '/applet/consult/reply',
    method: 'post',
    data
  })
}
// 咨询详情 - 回复采纳
export const answerReplyAdopt = (params) => {
  return request({
    url: '/applet/consult/reply/adopt',
    method: 'put',
    params
  })
}
// 咨询详情 - 回复点赞
export const answerReplyLike = (params) => {
  return request({
    url: '/applet/consult/reply/like/'+params.id,
  })
}
// 咨询详情 - 回复取消点赞
export const answerReplyUnlike = (params) => {
  return request({
    url: '/applet/consult/reply/unlike/'+params.id,
  })
}

// 个人主页 = 用户信息
export const homeUser = (params) => {
  return request({
    url: '/applet/member/applet-anon/expert/home/'+params.id
  })
}

// 个人主页 - 回答列表
export const homeAnswer = (params) => {
  return request({
    url: '/applet/applet-anon/member/concern/expert/answer',
    params
  })
}
// 个人主页 - 咨询列表
export const homeConsult = (params) => {
  return request({
    url: '/applet/applet-anon/member/concern/expert/consult',
    params
  })
}
// 个人主页 - 课程列表
export const homeCourse = (params) => {
  return request({
    url: '/applet/applet-anon/member/concern/expert/course',
    params
  })
}
// 个人主页 - 关注
export const homeFollow = (params) => {
  return request({
    url: '/applet/member/concern/follow',
    params
  })
}
// 个人主页 - 取消关注
export const homeUnfollow = (params) => {
  return request({
    url: '/applet/member/concern/unfollow',
    method: 'delete',
    params
  })
}
// 滴答标签
export const getAnswerTags = (params) => {
  return request({
    url: '/applet/consult/answer/tags'
  })
}
// 专家滴答 - 专家列表
export const expertTickList = (params) => {
  return request({
    url: '/applet/consult/answer',
    params
  })
}

// 发布咨询
export const publishAnswer = (data) => {
  return request({
    url: '/applet/consult',
    method: 'post',
    data,
    loading: '发布中...'
  })
}
export const consultEnd = (params) => {
  return request({
    url: '/applet/consult/end',
    method: 'get',
    params
  })
}
export const consultAppraise = (params) => {
  return request({
    url: '/applet/consult/appraise',
    method: 'get',
    params
  })
}



// 发布咨询 - 抢答
export const publishExpertList = (params) => {
  return request({
    url: '/applet/expert/applet-anon',
    params
  })
}

// 发布咨询 - 抢答
export const expertTickId = (params) => {
  return request({
    url: '/applet/consult/dida/answer',
    method: 'get',
    // params
  })
}
// 专家详情
export const expertInfo = (params) => {
  return request({
    url: '/applet/expert/'+params.id,
  })
}


// 查询滴答状态
export const getAnswerStatus = (params) => {
  return request({
    url: '/applet/consult/answer/status',
    params
  })
}
// 专家滴答 - 抢答
export const gotoAnswer = (params) => {
  return request({
    url: '/applet/consult/answer',
    method: 'post',
    params
  })
}
// 专家滴答 - 取消抢答
export const gotoAnswerDelete = (params) => {
  return request({
    url: '/applet/consult/dida/answer',
    method: 'delete',
    params
  })
}


// 隐私号码AXB绑定
export const axbBindNumber = (params) => {
  return request({
    url: '/applet/huaweicloud/secret/axbBindNumber',
    method: 'get',
    params
  })
}
// 修改用户手机号
export const phoneEdit = (params) => {
  return request({
    url: '/applet/consult/order/update',
    method: 'get',
    params
  })
}
// 我的咨询列表
export const orderList = (data) => {
  return request({
    url: '/applet/consult/order/list',
    method: 'post',
    data
  })
}
// 提交用户评价
export const evaluate = (data) => {
  return request({
    url: '/applet/consult/order/evaluate',
    method: 'post',
    data
  })
}
// 专家工作台-咨询中心
export const settlementList = (data) => {
  return request({
    url: '/applet/consult/order/settlement',
    method: 'post',
    data
  })
}
// 线下咨询-咨询凭证详情
export const settlementDetail = (params) => {
  return request({
    url: '/applet/consult/order/settlement',
    method: 'get',
    params
  })
}

// 专家咨询
export const expertConsultList = (params) => {
  return request({
    url: '/applet/expert/applet-anon/page',
    method: 'get',
    params
  })
}
// 专家详情,时间
export const expertConsultDetails = (params) => {
  return request({
    url: '/applet/expert/applet-anon/consult/times',
    method: 'get',
    params
  })
}
// 线下咨询-咨询详情
export const offlineDetail = () => {
  return request({
    url: '/applet/consult/order/offline',
    method: 'get'
  })
}
// 线下咨询预约专家订单
export const offlinePay = (params) => {
  return request({
    url: '/applet/bksOrder/offline',
    method: 'post',
    params
  })
}
// 专家咨询订单
export const expertConsultOrderSubmit = (data) => {
  return request({
    url: '/applet/bksOrder/export/consult',
    method: 'post',
    data
  })
}
// 专家咨询取消订单
export const expertConsultOrderCancel = (data) => {
  return request({
    url: '/applet/bksOrder/export/consult/cancel',
    method: 'get',
    data
  })
}
// 所有专家级别详情
export const expertLevelList = () => {
  return request({
    url: '/applet/expert/level/applet-anon/details',
    method: 'get'
  })
}

// 修改咨询为专家滴答 
export const expertConsultId = (params) => {
  return request({
    url: '/applet/consult/modify/dd/'+params.consultId,
    method: 'get',
    params
  })
}

// 向专家求助列表  
export const expertAskist = (params) => {
  return request({
    url: '/applet/consult/ask/expert',
    method: 'get',
    params
  })
}

// 发布咨询后,@专家   
export const appointExpert = (params) => {
  return request({
    url: '/applet/consult/modify/experts',
    method: 'get',
    params
  })
}
